/**
 * 
 */
package edu.rice.myxo.utils;

/**
 * @author frogy
 *
 */
public class Matrix {
	private int dimensionCount;
	private int[] dimensionLength;
	private double[][] data;
	public Matrix(int dim, int[] dimLength){
		dimensionCount = dim;
		dimensionLength = dimLength;
		data = new double[dimensionLength[0]][dimensionLength[1]];
		for(int i = 0; i < data.length; i++){
			data[i] = new double[dimensionLength[1]];
			for(int j = 0; j < data[0].length; j++){
				data[i][j] = 0;
			}
		}
	}
	
	public void setMatrixValue(double value, int i, int j){
		data[i][j] = value;
	}
	
	//return the largest eig value
	public double eig(){
		double eigValue = 0;
		double e = 0.000001;
		double[] x = new double[dimensionLength[0]];
		double[] xo = new double[dimensionLength[0]];
		for(int i = 0; i < x.length; i++){
			x[i] = 1;
		}
		double er = 1;
		while(er > e){
			for(int i = 0; i < x.length; i++){
				for(int j = 0; j < dimensionLength[i]; j++){
					
				}
			}
		}
		return eigValue;
	}
	
}
